﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using HslCommunication.Core;
using HslCommunication.Enthernet.Redis;
using Newtonsoft.Json.Linq;

namespace HslCommunication.Reflection
{
	/// <summary>
	/// 反射的辅助类
	/// </summary>
	// Token: 0x02000114 RID: 276
	public class HslReflectionHelper
	{
		/// <summary>
		/// 从设备里读取支持Hsl特性的数据内容，该特性为<see cref="T:HslCommunication.Reflection.HslDeviceAddressAttribute" />，详细参考论坛的操作说明。
		/// </summary>
		/// <typeparam name="T">自定义的数据类型对象</typeparam>
		/// <param name="readWrite">读写接口的实现</param>
		/// <returns>包含是否成功的结果对象</returns>
		// Token: 0x060017D6 RID: 6102 RVA: 0x00078A7C File Offset: 0x00076C7C
		public static OperateResult<T> Read<T>(IReadWriteNet readWrite) where T : class, new()
		{
			Type typeFromHandle = typeof(T);
			object obj = typeFromHandle.Assembly.CreateInstance(typeFromHandle.FullName);
			PropertyInfo[] properties = typeFromHandle.GetProperties(BindingFlags.Instance | BindingFlags.Public);
			foreach (PropertyInfo propertyInfo in properties)
			{
				object[] customAttributes = propertyInfo.GetCustomAttributes(typeof(HslDeviceAddressAttribute), false);
				bool flag = customAttributes == null;
				if (!flag)
				{
					HslDeviceAddressAttribute hslDeviceAddressAttribute = null;
					foreach (HslDeviceAddressAttribute hslDeviceAddressAttribute2 in customAttributes)
					{
						bool flag2 = hslDeviceAddressAttribute2.DeviceType != null && hslDeviceAddressAttribute2.DeviceType == readWrite.GetType();
						if (flag2)
						{
							hslDeviceAddressAttribute = hslDeviceAddressAttribute2;
							break;
						}
					}
					bool flag3 = hslDeviceAddressAttribute == null;
					if (flag3)
					{
						foreach (HslDeviceAddressAttribute hslDeviceAddressAttribute3 in customAttributes)
						{
							bool flag4 = hslDeviceAddressAttribute3.DeviceType == null;
							if (flag4)
							{
								hslDeviceAddressAttribute = hslDeviceAddressAttribute3;
								break;
							}
						}
					}
					bool flag5 = hslDeviceAddressAttribute == null;
					if (!flag5)
					{
						Type propertyType = propertyInfo.PropertyType;
						bool flag6 = propertyType == typeof(short);
						if (flag6)
						{
							OperateResult<short> operateResult = readWrite.ReadInt16(hslDeviceAddressAttribute.Address);
							bool flag7 = !operateResult.IsSuccess;
							if (flag7)
							{
								return OperateResult.CreateFailedResult<T>(operateResult);
							}
							propertyInfo.SetValue(obj, operateResult.Content, null);
						}
						else
						{
							bool flag8 = propertyType == typeof(short[]);
							if (flag8)
							{
								OperateResult<short[]> operateResult2 = readWrite.ReadInt16(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
								bool flag9 = !operateResult2.IsSuccess;
								if (flag9)
								{
									return OperateResult.CreateFailedResult<T>(operateResult2);
								}
								propertyInfo.SetValue(obj, operateResult2.Content, null);
							}
							else
							{
								bool flag10 = propertyType == typeof(ushort);
								if (flag10)
								{
									OperateResult<ushort> operateResult3 = readWrite.ReadUInt16(hslDeviceAddressAttribute.Address);
									bool flag11 = !operateResult3.IsSuccess;
									if (flag11)
									{
										return OperateResult.CreateFailedResult<T>(operateResult3);
									}
									propertyInfo.SetValue(obj, operateResult3.Content, null);
								}
								else
								{
									bool flag12 = propertyType == typeof(ushort[]);
									if (flag12)
									{
										OperateResult<ushort[]> operateResult4 = readWrite.ReadUInt16(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
										bool flag13 = !operateResult4.IsSuccess;
										if (flag13)
										{
											return OperateResult.CreateFailedResult<T>(operateResult4);
										}
										propertyInfo.SetValue(obj, operateResult4.Content, null);
									}
									else
									{
										bool flag14 = propertyType == typeof(int);
										if (flag14)
										{
											OperateResult<int> operateResult5 = readWrite.ReadInt32(hslDeviceAddressAttribute.Address);
											bool flag15 = !operateResult5.IsSuccess;
											if (flag15)
											{
												return OperateResult.CreateFailedResult<T>(operateResult5);
											}
											propertyInfo.SetValue(obj, operateResult5.Content, null);
										}
										else
										{
											bool flag16 = propertyType == typeof(int[]);
											if (flag16)
											{
												OperateResult<int[]> operateResult6 = readWrite.ReadInt32(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
												bool flag17 = !operateResult6.IsSuccess;
												if (flag17)
												{
													return OperateResult.CreateFailedResult<T>(operateResult6);
												}
												propertyInfo.SetValue(obj, operateResult6.Content, null);
											}
											else
											{
												bool flag18 = propertyType == typeof(uint);
												if (flag18)
												{
													OperateResult<uint> operateResult7 = readWrite.ReadUInt32(hslDeviceAddressAttribute.Address);
													bool flag19 = !operateResult7.IsSuccess;
													if (flag19)
													{
														return OperateResult.CreateFailedResult<T>(operateResult7);
													}
													propertyInfo.SetValue(obj, operateResult7.Content, null);
												}
												else
												{
													bool flag20 = propertyType == typeof(uint[]);
													if (flag20)
													{
														OperateResult<uint[]> operateResult8 = readWrite.ReadUInt32(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
														bool flag21 = !operateResult8.IsSuccess;
														if (flag21)
														{
															return OperateResult.CreateFailedResult<T>(operateResult8);
														}
														propertyInfo.SetValue(obj, operateResult8.Content, null);
													}
													else
													{
														bool flag22 = propertyType == typeof(long);
														if (flag22)
														{
															OperateResult<long> operateResult9 = readWrite.ReadInt64(hslDeviceAddressAttribute.Address);
															bool flag23 = !operateResult9.IsSuccess;
															if (flag23)
															{
																return OperateResult.CreateFailedResult<T>(operateResult9);
															}
															propertyInfo.SetValue(obj, operateResult9.Content, null);
														}
														else
														{
															bool flag24 = propertyType == typeof(long[]);
															if (flag24)
															{
																OperateResult<long[]> operateResult10 = readWrite.ReadInt64(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
																bool flag25 = !operateResult10.IsSuccess;
																if (flag25)
																{
																	return OperateResult.CreateFailedResult<T>(operateResult10);
																}
																propertyInfo.SetValue(obj, operateResult10.Content, null);
															}
															else
															{
																bool flag26 = propertyType == typeof(ulong);
																if (flag26)
																{
																	OperateResult<ulong> operateResult11 = readWrite.ReadUInt64(hslDeviceAddressAttribute.Address);
																	bool flag27 = !operateResult11.IsSuccess;
																	if (flag27)
																	{
																		return OperateResult.CreateFailedResult<T>(operateResult11);
																	}
																	propertyInfo.SetValue(obj, operateResult11.Content, null);
																}
																else
																{
																	bool flag28 = propertyType == typeof(ulong[]);
																	if (flag28)
																	{
																		OperateResult<ulong[]> operateResult12 = readWrite.ReadUInt64(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
																		bool flag29 = !operateResult12.IsSuccess;
																		if (flag29)
																		{
																			return OperateResult.CreateFailedResult<T>(operateResult12);
																		}
																		propertyInfo.SetValue(obj, operateResult12.Content, null);
																	}
																	else
																	{
																		bool flag30 = propertyType == typeof(float);
																		if (flag30)
																		{
																			OperateResult<float> operateResult13 = readWrite.ReadFloat(hslDeviceAddressAttribute.Address);
																			bool flag31 = !operateResult13.IsSuccess;
																			if (flag31)
																			{
																				return OperateResult.CreateFailedResult<T>(operateResult13);
																			}
																			propertyInfo.SetValue(obj, operateResult13.Content, null);
																		}
																		else
																		{
																			bool flag32 = propertyType == typeof(float[]);
																			if (flag32)
																			{
																				OperateResult<float[]> operateResult14 = readWrite.ReadFloat(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
																				bool flag33 = !operateResult14.IsSuccess;
																				if (flag33)
																				{
																					return OperateResult.CreateFailedResult<T>(operateResult14);
																				}
																				propertyInfo.SetValue(obj, operateResult14.Content, null);
																			}
																			else
																			{
																				bool flag34 = propertyType == typeof(double);
																				if (flag34)
																				{
																					OperateResult<double> operateResult15 = readWrite.ReadDouble(hslDeviceAddressAttribute.Address);
																					bool flag35 = !operateResult15.IsSuccess;
																					if (flag35)
																					{
																						return OperateResult.CreateFailedResult<T>(operateResult15);
																					}
																					propertyInfo.SetValue(obj, operateResult15.Content, null);
																				}
																				else
																				{
																					bool flag36 = propertyType == typeof(double[]);
																					if (flag36)
																					{
																						OperateResult<double[]> operateResult16 = readWrite.ReadDouble(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
																						bool flag37 = !operateResult16.IsSuccess;
																						if (flag37)
																						{
																							return OperateResult.CreateFailedResult<T>(operateResult16);
																						}
																						propertyInfo.SetValue(obj, operateResult16.Content, null);
																					}
																					else
																					{
																						bool flag38 = propertyType == typeof(string);
																						if (flag38)
																						{
																							OperateResult<string> operateResult17 = readWrite.ReadString(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
																							bool flag39 = !operateResult17.IsSuccess;
																							if (flag39)
																							{
																								return OperateResult.CreateFailedResult<T>(operateResult17);
																							}
																							propertyInfo.SetValue(obj, operateResult17.Content, null);
																						}
																						else
																						{
																							bool flag40 = propertyType == typeof(byte[]);
																							if (flag40)
																							{
																								OperateResult<byte[]> operateResult18 = readWrite.Read(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
																								bool flag41 = !operateResult18.IsSuccess;
																								if (flag41)
																								{
																									return OperateResult.CreateFailedResult<T>(operateResult18);
																								}
																								propertyInfo.SetValue(obj, operateResult18.Content, null);
																							}
																							else
																							{
																								bool flag42 = propertyType == typeof(bool);
																								if (flag42)
																								{
																									OperateResult<bool> operateResult19 = readWrite.ReadBool(hslDeviceAddressAttribute.Address);
																									bool flag43 = !operateResult19.IsSuccess;
																									if (flag43)
																									{
																										return OperateResult.CreateFailedResult<T>(operateResult19);
																									}
																									propertyInfo.SetValue(obj, operateResult19.Content, null);
																								}
																								else
																								{
																									bool flag44 = propertyType == typeof(bool[]);
																									if (flag44)
																									{
																										OperateResult<bool[]> operateResult20 = readWrite.ReadBool(hslDeviceAddressAttribute.Address, (ushort)((hslDeviceAddressAttribute.Length > 0) ? hslDeviceAddressAttribute.Length : 1));
																										bool flag45 = !operateResult20.IsSuccess;
																										if (flag45)
																										{
																											return OperateResult.CreateFailedResult<T>(operateResult20);
																										}
																										propertyInfo.SetValue(obj, operateResult20.Content, null);
																									}
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			return OperateResult.CreateSuccessResult<T>((T)((object)obj));
		}

		/// <summary>
		/// 从设备里读取支持Hsl特性的数据内容，该特性为<see cref="T:HslCommunication.Reflection.HslDeviceAddressAttribute" />，详细参考论坛的操作说明。
		/// </summary>
		/// <typeparam name="T">自定义的数据类型对象</typeparam>
		/// <param name="data">自定义的数据对象</param>
		/// <param name="readWrite">数据读写对象</param>
		/// <returns>包含是否成功的结果对象</returns>
		/// <exception cref="T:System.ArgumentNullException"></exception>
		// Token: 0x060017D7 RID: 6103 RVA: 0x00079404 File Offset: 0x00077604
		public static OperateResult Write<T>(T data, IReadWriteNet readWrite) where T : class, new()
		{
			bool flag = data == null;
			if (flag)
			{
				throw new ArgumentNullException("data");
			}
			Type typeFromHandle = typeof(T);
			PropertyInfo[] properties = typeFromHandle.GetProperties(BindingFlags.Instance | BindingFlags.Public);
			foreach (PropertyInfo propertyInfo in properties)
			{
				object[] customAttributes = propertyInfo.GetCustomAttributes(typeof(HslDeviceAddressAttribute), false);
				bool flag2 = customAttributes == null;
				if (!flag2)
				{
					HslDeviceAddressAttribute hslDeviceAddressAttribute = null;
					foreach (HslDeviceAddressAttribute hslDeviceAddressAttribute2 in customAttributes)
					{
						bool flag3 = hslDeviceAddressAttribute2.DeviceType != null && hslDeviceAddressAttribute2.DeviceType == readWrite.GetType();
						if (flag3)
						{
							hslDeviceAddressAttribute = hslDeviceAddressAttribute2;
							break;
						}
					}
					bool flag4 = hslDeviceAddressAttribute == null;
					if (flag4)
					{
						foreach (HslDeviceAddressAttribute hslDeviceAddressAttribute3 in customAttributes)
						{
							bool flag5 = hslDeviceAddressAttribute3.DeviceType == null;
							if (flag5)
							{
								hslDeviceAddressAttribute = hslDeviceAddressAttribute3;
								break;
							}
						}
					}
					bool flag6 = hslDeviceAddressAttribute == null;
					if (!flag6)
					{
						Type propertyType = propertyInfo.PropertyType;
						bool flag7 = propertyType == typeof(short);
						if (flag7)
						{
							short value = (short)propertyInfo.GetValue(data, null);
							OperateResult operateResult = readWrite.Write(hslDeviceAddressAttribute.Address, value);
							bool flag8 = !operateResult.IsSuccess;
							if (flag8)
							{
								return operateResult;
							}
						}
						else
						{
							bool flag9 = propertyType == typeof(short[]);
							if (flag9)
							{
								short[] values = (short[])propertyInfo.GetValue(data, null);
								OperateResult operateResult2 = readWrite.Write(hslDeviceAddressAttribute.Address, values);
								bool flag10 = !operateResult2.IsSuccess;
								if (flag10)
								{
									return operateResult2;
								}
							}
							else
							{
								bool flag11 = propertyType == typeof(ushort);
								if (flag11)
								{
									ushort value2 = (ushort)propertyInfo.GetValue(data, null);
									OperateResult operateResult3 = readWrite.Write(hslDeviceAddressAttribute.Address, value2);
									bool flag12 = !operateResult3.IsSuccess;
									if (flag12)
									{
										return operateResult3;
									}
								}
								else
								{
									bool flag13 = propertyType == typeof(ushort[]);
									if (flag13)
									{
										ushort[] values2 = (ushort[])propertyInfo.GetValue(data, null);
										OperateResult operateResult4 = readWrite.Write(hslDeviceAddressAttribute.Address, values2);
										bool flag14 = !operateResult4.IsSuccess;
										if (flag14)
										{
											return operateResult4;
										}
									}
									else
									{
										bool flag15 = propertyType == typeof(int);
										if (flag15)
										{
											int value3 = (int)propertyInfo.GetValue(data, null);
											OperateResult operateResult5 = readWrite.Write(hslDeviceAddressAttribute.Address, value3);
											bool flag16 = !operateResult5.IsSuccess;
											if (flag16)
											{
												return operateResult5;
											}
										}
										else
										{
											bool flag17 = propertyType == typeof(int[]);
											if (flag17)
											{
												int[] values3 = (int[])propertyInfo.GetValue(data, null);
												OperateResult operateResult6 = readWrite.Write(hslDeviceAddressAttribute.Address, values3);
												bool flag18 = !operateResult6.IsSuccess;
												if (flag18)
												{
													return operateResult6;
												}
											}
											else
											{
												bool flag19 = propertyType == typeof(uint);
												if (flag19)
												{
													uint value4 = (uint)propertyInfo.GetValue(data, null);
													OperateResult operateResult7 = readWrite.Write(hslDeviceAddressAttribute.Address, value4);
													bool flag20 = !operateResult7.IsSuccess;
													if (flag20)
													{
														return operateResult7;
													}
												}
												else
												{
													bool flag21 = propertyType == typeof(uint[]);
													if (flag21)
													{
														uint[] values4 = (uint[])propertyInfo.GetValue(data, null);
														OperateResult operateResult8 = readWrite.Write(hslDeviceAddressAttribute.Address, values4);
														bool flag22 = !operateResult8.IsSuccess;
														if (flag22)
														{
															return operateResult8;
														}
													}
													else
													{
														bool flag23 = propertyType == typeof(long);
														if (flag23)
														{
															long value5 = (long)propertyInfo.GetValue(data, null);
															OperateResult operateResult9 = readWrite.Write(hslDeviceAddressAttribute.Address, value5);
															bool flag24 = !operateResult9.IsSuccess;
															if (flag24)
															{
																return operateResult9;
															}
														}
														else
														{
															bool flag25 = propertyType == typeof(long[]);
															if (flag25)
															{
																long[] values5 = (long[])propertyInfo.GetValue(data, null);
																OperateResult operateResult10 = readWrite.Write(hslDeviceAddressAttribute.Address, values5);
																bool flag26 = !operateResult10.IsSuccess;
																if (flag26)
																{
																	return operateResult10;
																}
															}
															else
															{
																bool flag27 = propertyType == typeof(ulong);
																if (flag27)
																{
																	ulong value6 = (ulong)propertyInfo.GetValue(data, null);
																	OperateResult operateResult11 = readWrite.Write(hslDeviceAddressAttribute.Address, value6);
																	bool flag28 = !operateResult11.IsSuccess;
																	if (flag28)
																	{
																		return operateResult11;
																	}
																}
																else
																{
																	bool flag29 = propertyType == typeof(ulong[]);
																	if (flag29)
																	{
																		ulong[] values6 = (ulong[])propertyInfo.GetValue(data, null);
																		OperateResult operateResult12 = readWrite.Write(hslDeviceAddressAttribute.Address, values6);
																		bool flag30 = !operateResult12.IsSuccess;
																		if (flag30)
																		{
																			return operateResult12;
																		}
																	}
																	else
																	{
																		bool flag31 = propertyType == typeof(float);
																		if (flag31)
																		{
																			float value7 = (float)propertyInfo.GetValue(data, null);
																			OperateResult operateResult13 = readWrite.Write(hslDeviceAddressAttribute.Address, value7);
																			bool flag32 = !operateResult13.IsSuccess;
																			if (flag32)
																			{
																				return operateResult13;
																			}
																		}
																		else
																		{
																			bool flag33 = propertyType == typeof(float[]);
																			if (flag33)
																			{
																				float[] values7 = (float[])propertyInfo.GetValue(data, null);
																				OperateResult operateResult14 = readWrite.Write(hslDeviceAddressAttribute.Address, values7);
																				bool flag34 = !operateResult14.IsSuccess;
																				if (flag34)
																				{
																					return operateResult14;
																				}
																			}
																			else
																			{
																				bool flag35 = propertyType == typeof(double);
																				if (flag35)
																				{
																					double value8 = (double)propertyInfo.GetValue(data, null);
																					OperateResult operateResult15 = readWrite.Write(hslDeviceAddressAttribute.Address, value8);
																					bool flag36 = !operateResult15.IsSuccess;
																					if (flag36)
																					{
																						return operateResult15;
																					}
																				}
																				else
																				{
																					bool flag37 = propertyType == typeof(double[]);
																					if (flag37)
																					{
																						double[] values8 = (double[])propertyInfo.GetValue(data, null);
																						OperateResult operateResult16 = readWrite.Write(hslDeviceAddressAttribute.Address, values8);
																						bool flag38 = !operateResult16.IsSuccess;
																						if (flag38)
																						{
																							return operateResult16;
																						}
																					}
																					else
																					{
																						bool flag39 = propertyType == typeof(string);
																						if (flag39)
																						{
																							string value9 = (string)propertyInfo.GetValue(data, null);
																							OperateResult operateResult17 = readWrite.Write(hslDeviceAddressAttribute.Address, value9);
																							bool flag40 = !operateResult17.IsSuccess;
																							if (flag40)
																							{
																								return operateResult17;
																							}
																						}
																						else
																						{
																							bool flag41 = propertyType == typeof(byte[]);
																							if (flag41)
																							{
																								byte[] value10 = (byte[])propertyInfo.GetValue(data, null);
																								OperateResult operateResult18 = readWrite.Write(hslDeviceAddressAttribute.Address, value10);
																								bool flag42 = !operateResult18.IsSuccess;
																								if (flag42)
																								{
																									return operateResult18;
																								}
																							}
																							else
																							{
																								bool flag43 = propertyType == typeof(bool);
																								if (flag43)
																								{
																									bool value11 = (bool)propertyInfo.GetValue(data, null);
																									OperateResult operateResult19 = readWrite.Write(hslDeviceAddressAttribute.Address, value11);
																									bool flag44 = !operateResult19.IsSuccess;
																									if (flag44)
																									{
																										return operateResult19;
																									}
																								}
																								else
																								{
																									bool flag45 = propertyType == typeof(bool[]);
																									if (flag45)
																									{
																										bool[] value12 = (bool[])propertyInfo.GetValue(data, null);
																										OperateResult operateResult20 = readWrite.Write(hslDeviceAddressAttribute.Address, value12);
																										bool flag46 = !operateResult20.IsSuccess;
																										if (flag46)
																										{
																											return operateResult20;
																										}
																									}
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			return OperateResult.CreateSuccessResult<T>(data);
		}

		/// <summary>
		/// 使用表达式树的方式来给一个属性赋值
		/// </summary>
		/// <param name="propertyInfo">属性信息</param>
		/// <param name="obj">对象信息</param>
		/// <param name="objValue">实际的值</param>
		// Token: 0x060017D8 RID: 6104 RVA: 0x00079C90 File Offset: 0x00077E90
		public static void SetPropertyExp<T, K>(PropertyInfo propertyInfo, T obj, K objValue)
		{
			ParameterExpression parameterExpression = Expression.Parameter(typeof(T), "obj");
			ParameterExpression parameterExpression2 = Expression.Parameter(propertyInfo.PropertyType, "objValue");
			MethodCallExpression methodCallExpression = Expression.Call(parameterExpression, propertyInfo.GetSetMethod(), new Expression[]
			{
				parameterExpression2
			});
			Expression<Action<T, K>> expression = Expression.Lambda<Action<T, K>>(methodCallExpression, new ParameterExpression[]
			{
				parameterExpression,
				parameterExpression2
			});
			expression.Compile()(obj, objValue);
		}

		/// <summary>
		/// 从设备里读取支持Hsl特性的数据内容，该特性为<see cref="T:HslCommunication.Reflection.HslDeviceAddressAttribute" />，详细参考论坛的操作说明。
		/// </summary>
		/// <typeparam name="T">自定义的数据类型对象</typeparam>
		/// <param name="readWrite">读写接口的实现</param>
		/// <returns>包含是否成功的结果对象</returns>
		// Token: 0x060017D9 RID: 6105 RVA: 0x00079D00 File Offset: 0x00077F00
		[DebuggerStepThrough]
		public static Task<OperateResult<T>> ReadAsync<T>(IReadWriteNet readWrite) where T : class, new()
		{
			HslReflectionHelper.<ReadAsync>d__3<T> <ReadAsync>d__ = new HslReflectionHelper.<ReadAsync>d__3<T>();
			<ReadAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<T>>.Create();
			<ReadAsync>d__.readWrite = readWrite;
			<ReadAsync>d__.<>1__state = -1;
			<ReadAsync>d__.<>t__builder.Start<HslReflectionHelper.<ReadAsync>d__3<T>>(ref <ReadAsync>d__);
			return <ReadAsync>d__.<>t__builder.Task;
		}

		/// <summary>
		/// 从设备里读取支持Hsl特性的数据内容，该特性为<see cref="T:HslCommunication.Reflection.HslDeviceAddressAttribute" />，详细参考论坛的操作说明。
		/// </summary>
		/// <typeparam name="T">自定义的数据类型对象</typeparam>
		/// <param name="data">自定义的数据对象</param>
		/// <param name="readWrite">数据读写对象</param>
		/// <returns>包含是否成功的结果对象</returns>
		/// <exception cref="T:System.ArgumentNullException"></exception>
		// Token: 0x060017DA RID: 6106 RVA: 0x00079D44 File Offset: 0x00077F44
		[DebuggerStepThrough]
		public static Task<OperateResult> WriteAsync<T>(T data, IReadWriteNet readWrite) where T : class, new()
		{
			HslReflectionHelper.<WriteAsync>d__4<T> <WriteAsync>d__ = new HslReflectionHelper.<WriteAsync>d__4<T>();
			<WriteAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<WriteAsync>d__.data = data;
			<WriteAsync>d__.readWrite = readWrite;
			<WriteAsync>d__.<>1__state = -1;
			<WriteAsync>d__.<>t__builder.Start<HslReflectionHelper.<WriteAsync>d__4<T>>(ref <WriteAsync>d__);
			return <WriteAsync>d__.<>t__builder.Task;
		}

		// Token: 0x060017DB RID: 6107 RVA: 0x00079D90 File Offset: 0x00077F90
		internal static void SetPropertyObjectValue(PropertyInfo property, object obj, string value)
		{
			Type propertyType = property.PropertyType;
			bool flag = propertyType == typeof(short);
			if (flag)
			{
				property.SetValue(obj, short.Parse(value), null);
			}
			else
			{
				bool flag2 = propertyType == typeof(ushort);
				if (flag2)
				{
					property.SetValue(obj, ushort.Parse(value), null);
				}
				else
				{
					bool flag3 = propertyType == typeof(int);
					if (flag3)
					{
						property.SetValue(obj, int.Parse(value), null);
					}
					else
					{
						bool flag4 = propertyType == typeof(uint);
						if (flag4)
						{
							property.SetValue(obj, uint.Parse(value), null);
						}
						else
						{
							bool flag5 = propertyType == typeof(long);
							if (flag5)
							{
								property.SetValue(obj, long.Parse(value), null);
							}
							else
							{
								bool flag6 = propertyType == typeof(ulong);
								if (flag6)
								{
									property.SetValue(obj, ulong.Parse(value), null);
								}
								else
								{
									bool flag7 = propertyType == typeof(float);
									if (flag7)
									{
										property.SetValue(obj, float.Parse(value), null);
									}
									else
									{
										bool flag8 = propertyType == typeof(double);
										if (flag8)
										{
											property.SetValue(obj, double.Parse(value), null);
										}
										else
										{
											bool flag9 = propertyType == typeof(string);
											if (flag9)
											{
												property.SetValue(obj, value, null);
											}
											else
											{
												bool flag10 = propertyType == typeof(byte);
												if (flag10)
												{
													property.SetValue(obj, byte.Parse(value), null);
												}
												else
												{
													bool flag11 = propertyType == typeof(bool);
													if (flag11)
													{
														property.SetValue(obj, bool.Parse(value), null);
													}
													else
													{
														property.SetValue(obj, value, null);
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}

		// Token: 0x060017DC RID: 6108 RVA: 0x00079F9C File Offset: 0x0007819C
		internal static void SetPropertyObjectValueArray(PropertyInfo property, object obj, string[] values)
		{
			Type propertyType = property.PropertyType;
			bool flag = propertyType == typeof(short[]);
			if (flag)
			{
				property.SetValue(obj, Enumerable.ToArray<short>(Enumerable.Select<string, short>(values, (string m) => short.Parse(m))), null);
			}
			else
			{
				bool flag2 = propertyType == typeof(List<short>);
				if (flag2)
				{
					property.SetValue(obj, Enumerable.ToList<short>(Enumerable.Select<string, short>(values, (string m) => short.Parse(m))), null);
				}
				else
				{
					bool flag3 = propertyType == typeof(ushort[]);
					if (flag3)
					{
						property.SetValue(obj, Enumerable.ToArray<ushort>(Enumerable.Select<string, ushort>(values, (string m) => ushort.Parse(m))), null);
					}
					else
					{
						bool flag4 = propertyType == typeof(List<ushort>);
						if (flag4)
						{
							property.SetValue(obj, Enumerable.ToList<ushort>(Enumerable.Select<string, ushort>(values, (string m) => ushort.Parse(m))), null);
						}
						else
						{
							bool flag5 = propertyType == typeof(int[]);
							if (flag5)
							{
								property.SetValue(obj, Enumerable.ToArray<int>(Enumerable.Select<string, int>(values, (string m) => int.Parse(m))), null);
							}
							else
							{
								bool flag6 = propertyType == typeof(List<int>);
								if (flag6)
								{
									property.SetValue(obj, Enumerable.ToList<int>(Enumerable.Select<string, int>(values, (string m) => int.Parse(m))), null);
								}
								else
								{
									bool flag7 = propertyType == typeof(uint[]);
									if (flag7)
									{
										property.SetValue(obj, Enumerable.ToArray<uint>(Enumerable.Select<string, uint>(values, (string m) => uint.Parse(m))), null);
									}
									else
									{
										bool flag8 = propertyType == typeof(List<uint>);
										if (flag8)
										{
											property.SetValue(obj, Enumerable.ToList<uint>(Enumerable.Select<string, uint>(values, (string m) => uint.Parse(m))), null);
										}
										else
										{
											bool flag9 = propertyType == typeof(long[]);
											if (flag9)
											{
												property.SetValue(obj, Enumerable.ToArray<long>(Enumerable.Select<string, long>(values, (string m) => long.Parse(m))), null);
											}
											else
											{
												bool flag10 = propertyType == typeof(List<long>);
												if (flag10)
												{
													property.SetValue(obj, Enumerable.ToList<long>(Enumerable.Select<string, long>(values, (string m) => long.Parse(m))), null);
												}
												else
												{
													bool flag11 = propertyType == typeof(ulong[]);
													if (flag11)
													{
														property.SetValue(obj, Enumerable.ToArray<ulong>(Enumerable.Select<string, ulong>(values, (string m) => ulong.Parse(m))), null);
													}
													else
													{
														bool flag12 = propertyType == typeof(List<ulong>);
														if (flag12)
														{
															property.SetValue(obj, Enumerable.ToList<ulong>(Enumerable.Select<string, ulong>(values, (string m) => ulong.Parse(m))), null);
														}
														else
														{
															bool flag13 = propertyType == typeof(float[]);
															if (flag13)
															{
																property.SetValue(obj, Enumerable.ToArray<float>(Enumerable.Select<string, float>(values, (string m) => float.Parse(m))), null);
															}
															else
															{
																bool flag14 = propertyType == typeof(List<float>);
																if (flag14)
																{
																	property.SetValue(obj, Enumerable.ToList<float>(Enumerable.Select<string, float>(values, (string m) => float.Parse(m))), null);
																}
																else
																{
																	bool flag15 = propertyType == typeof(double[]);
																	if (flag15)
																	{
																		property.SetValue(obj, Enumerable.ToArray<double>(Enumerable.Select<string, double>(values, (string m) => double.Parse(m))), null);
																	}
																	else
																	{
																		bool flag16 = propertyType == typeof(double[]);
																		if (flag16)
																		{
																			property.SetValue(obj, Enumerable.ToList<double>(Enumerable.Select<string, double>(values, (string m) => double.Parse(m))), null);
																		}
																		else
																		{
																			bool flag17 = propertyType == typeof(string[]);
																			if (flag17)
																			{
																				property.SetValue(obj, values, null);
																			}
																			else
																			{
																				bool flag18 = propertyType == typeof(List<string>);
																				if (flag18)
																				{
																					property.SetValue(obj, new List<string>(values), null);
																				}
																				else
																				{
																					bool flag19 = propertyType == typeof(byte[]);
																					if (flag19)
																					{
																						property.SetValue(obj, Enumerable.ToArray<byte>(Enumerable.Select<string, byte>(values, (string m) => byte.Parse(m))), null);
																					}
																					else
																					{
																						bool flag20 = propertyType == typeof(List<byte>);
																						if (flag20)
																						{
																							property.SetValue(obj, Enumerable.ToList<byte>(Enumerable.Select<string, byte>(values, (string m) => byte.Parse(m))), null);
																						}
																						else
																						{
																							bool flag21 = propertyType == typeof(bool[]);
																							if (flag21)
																							{
																								property.SetValue(obj, Enumerable.ToArray<bool>(Enumerable.Select<string, bool>(values, (string m) => bool.Parse(m))), null);
																							}
																							else
																							{
																								bool flag22 = propertyType == typeof(List<bool>);
																								if (flag22)
																								{
																									property.SetValue(obj, Enumerable.ToList<bool>(Enumerable.Select<string, bool>(values, (string m) => bool.Parse(m))), null);
																								}
																								else
																								{
																									property.SetValue(obj, values, null);
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}

		/// <summary>
		/// 从设备里读取支持Hsl特性的数据内容，
		/// 该特性为<see cref="T:HslCommunication.Reflection.HslRedisKeyAttribute" />，<see cref="T:HslCommunication.Reflection.HslRedisListItemAttribute" />，
		/// <see cref="T:HslCommunication.Reflection.HslRedisListAttribute" />，<see cref="T:HslCommunication.Reflection.HslRedisHashFieldAttribute" />
		/// 详细参考代码示例的操作说明。
		/// </summary>
		/// <typeparam name="T">自定义的数据类型对象</typeparam>
		/// <param name="redis">Redis的数据对象</param>
		/// <returns>包含是否成功的结果对象</returns>
		// Token: 0x060017DD RID: 6109 RVA: 0x0007A618 File Offset: 0x00078818
		public static OperateResult<T> Read<T>(RedisClient redis) where T : class, new()
		{
			Type typeFromHandle = typeof(T);
			object obj = typeFromHandle.Assembly.CreateInstance(typeFromHandle.FullName);
			PropertyInfo[] properties = typeFromHandle.GetProperties(BindingFlags.Instance | BindingFlags.Public);
			List<PropertyInfoKeyName> list = new List<PropertyInfoKeyName>();
			List<PropertyInfoHashKeyName> list2 = new List<PropertyInfoHashKeyName>();
			foreach (PropertyInfo propertyInfo in properties)
			{
				object[] customAttributes = propertyInfo.GetCustomAttributes(typeof(HslRedisKeyAttribute), false);
				bool flag = customAttributes != null && customAttributes.Length != 0;
				if (!flag)
				{
					customAttributes = propertyInfo.GetCustomAttributes(typeof(HslRedisListItemAttribute), false);
					bool flag2 = customAttributes != null && customAttributes.Length != 0;
					OperateResult<T> result;
					if (flag2)
					{
						HslRedisListItemAttribute hslRedisListItemAttribute = (HslRedisListItemAttribute)customAttributes[0];
						OperateResult<string> operateResult = redis.ReadListByIndex(hslRedisListItemAttribute.ListKey, hslRedisListItemAttribute.Index);
						bool flag3 = !operateResult.IsSuccess;
						if (!flag3)
						{
							HslReflectionHelper.SetPropertyObjectValue(propertyInfo, obj, operateResult.Content);
							goto IL_1E4;
						}
						result = OperateResult.CreateFailedResult<T>(operateResult);
					}
					else
					{
						customAttributes = propertyInfo.GetCustomAttributes(typeof(HslRedisListAttribute), false);
						bool flag4 = customAttributes != null && customAttributes.Length != 0;
						if (flag4)
						{
							HslRedisListAttribute hslRedisListAttribute = (HslRedisListAttribute)customAttributes[0];
							OperateResult<string[]> operateResult2 = redis.ListRange(hslRedisListAttribute.ListKey, hslRedisListAttribute.StartIndex, hslRedisListAttribute.EndIndex);
							bool flag5 = !operateResult2.IsSuccess;
							if (!flag5)
							{
								HslReflectionHelper.SetPropertyObjectValueArray(propertyInfo, obj, operateResult2.Content);
								goto IL_1E4;
							}
							result = OperateResult.CreateFailedResult<T>(operateResult2);
						}
						else
						{
							customAttributes = propertyInfo.GetCustomAttributes(typeof(HslRedisHashFieldAttribute), false);
							bool flag6 = customAttributes != null && customAttributes.Length != 0;
							if (flag6)
							{
								HslRedisHashFieldAttribute hslRedisHashFieldAttribute = (HslRedisHashFieldAttribute)customAttributes[0];
								list2.Add(new PropertyInfoHashKeyName(propertyInfo, hslRedisHashFieldAttribute.HaskKey, hslRedisHashFieldAttribute.Field));
								goto IL_1E4;
							}
							goto IL_1E4;
						}
					}
					return result;
				}
				HslRedisKeyAttribute hslRedisKeyAttribute = (HslRedisKeyAttribute)customAttributes[0];
				list.Add(new PropertyInfoKeyName(propertyInfo, hslRedisKeyAttribute.KeyName));
				IL_1E4:;
			}
			bool flag7 = list.Count > 0;
			if (flag7)
			{
				OperateResult<string[]> operateResult3 = redis.ReadKey(Enumerable.ToArray<string>(Enumerable.Select<PropertyInfoKeyName, string>(list, (PropertyInfoKeyName m) => m.KeyName)));
				bool flag8 = !operateResult3.IsSuccess;
				if (flag8)
				{
					return OperateResult.CreateFailedResult<T>(operateResult3);
				}
				for (int j = 0; j < list.Count; j++)
				{
					HslReflectionHelper.SetPropertyObjectValue(list[j].PropertyInfo, obj, operateResult3.Content[j]);
				}
			}
			bool flag9 = list2.Count > 0;
			if (flag9)
			{
				var enumerable = Enumerable.Select(Enumerable.GroupBy<PropertyInfoHashKeyName, string>(list2, (PropertyInfoHashKeyName m) => m.KeyName), (IGrouping<string, PropertyInfoHashKeyName> g) => new
				{
					Key = g.Key,
					Values = Enumerable.ToArray<PropertyInfoHashKeyName>(g)
				});
				foreach (var <>f__AnonymousType in enumerable)
				{
					bool flag10 = <>f__AnonymousType.Values.Length == 1;
					if (flag10)
					{
						OperateResult<string> operateResult4 = redis.ReadHashKey(<>f__AnonymousType.Key, <>f__AnonymousType.Values[0].Field);
						bool flag11 = !operateResult4.IsSuccess;
						if (flag11)
						{
							return OperateResult.CreateFailedResult<T>(operateResult4);
						}
						HslReflectionHelper.SetPropertyObjectValue(<>f__AnonymousType.Values[0].PropertyInfo, obj, operateResult4.Content);
					}
					else
					{
						OperateResult<string[]> operateResult5 = redis.ReadHashKey(<>f__AnonymousType.Key, Enumerable.ToArray<string>(Enumerable.Select<PropertyInfoHashKeyName, string>(<>f__AnonymousType.Values, (PropertyInfoHashKeyName m) => m.Field)));
						bool flag12 = !operateResult5.IsSuccess;
						if (flag12)
						{
							return OperateResult.CreateFailedResult<T>(operateResult5);
						}
						for (int k = 0; k < <>f__AnonymousType.Values.Length; k++)
						{
							HslReflectionHelper.SetPropertyObjectValue(<>f__AnonymousType.Values[k].PropertyInfo, obj, operateResult5.Content[k]);
						}
					}
				}
			}
			return OperateResult.CreateSuccessResult<T>((T)((object)obj));
		}

		/// <summary>
		/// 从设备里写入支持Hsl特性的数据内容，
		/// 该特性为<see cref="T:HslCommunication.Reflection.HslRedisKeyAttribute" /> ，<see cref="T:HslCommunication.Reflection.HslRedisHashFieldAttribute" />
		/// 需要注意的是写入并不支持<see cref="T:HslCommunication.Reflection.HslRedisListAttribute" />，<see cref="T:HslCommunication.Reflection.HslRedisListItemAttribute" />特性，详细参考代码示例的操作说明。
		/// </summary>
		/// <typeparam name="T">自定义的数据类型对象</typeparam>
		/// <param name="data">等待写入的数据参数</param>
		/// <param name="redis">Redis的数据对象</param>
		/// <returns>包含是否成功的结果对象</returns>
		// Token: 0x060017DE RID: 6110 RVA: 0x0007AA84 File Offset: 0x00078C84
		public static OperateResult Write<T>(T data, RedisClient redis) where T : class, new()
		{
			Type typeFromHandle = typeof(T);
			PropertyInfo[] properties = typeFromHandle.GetProperties(BindingFlags.Instance | BindingFlags.Public);
			List<PropertyInfoKeyName> list = new List<PropertyInfoKeyName>();
			List<PropertyInfoHashKeyName> list2 = new List<PropertyInfoHashKeyName>();
			foreach (PropertyInfo propertyInfo in properties)
			{
				object[] customAttributes = propertyInfo.GetCustomAttributes(typeof(HslRedisKeyAttribute), false);
				bool flag = customAttributes != null && customAttributes.Length != 0;
				if (flag)
				{
					HslRedisKeyAttribute hslRedisKeyAttribute = (HslRedisKeyAttribute)customAttributes[0];
					list.Add(new PropertyInfoKeyName(propertyInfo, hslRedisKeyAttribute.KeyName, propertyInfo.GetValue(data, null).ToString()));
				}
				else
				{
					customAttributes = propertyInfo.GetCustomAttributes(typeof(HslRedisHashFieldAttribute), false);
					bool flag2 = customAttributes != null && customAttributes.Length != 0;
					if (flag2)
					{
						HslRedisHashFieldAttribute hslRedisHashFieldAttribute = (HslRedisHashFieldAttribute)customAttributes[0];
						list2.Add(new PropertyInfoHashKeyName(propertyInfo, hslRedisHashFieldAttribute.HaskKey, hslRedisHashFieldAttribute.Field, propertyInfo.GetValue(data, null).ToString()));
					}
				}
			}
			bool flag3 = list.Count > 0;
			if (flag3)
			{
				OperateResult operateResult = redis.WriteKey(Enumerable.ToArray<string>(Enumerable.Select<PropertyInfoKeyName, string>(list, (PropertyInfoKeyName m) => m.KeyName)), Enumerable.ToArray<string>(Enumerable.Select<PropertyInfoKeyName, string>(list, (PropertyInfoKeyName m) => m.Value)));
				bool flag4 = !operateResult.IsSuccess;
				if (flag4)
				{
					return operateResult;
				}
			}
			bool flag5 = list2.Count > 0;
			if (flag5)
			{
				var enumerable = Enumerable.Select(Enumerable.GroupBy<PropertyInfoHashKeyName, string>(list2, (PropertyInfoHashKeyName m) => m.KeyName), (IGrouping<string, PropertyInfoHashKeyName> g) => new
				{
					Key = g.Key,
					Values = Enumerable.ToArray<PropertyInfoHashKeyName>(g)
				});
				foreach (var <>f__AnonymousType in enumerable)
				{
					bool flag6 = <>f__AnonymousType.Values.Length == 1;
					if (flag6)
					{
						OperateResult operateResult2 = redis.WriteHashKey(<>f__AnonymousType.Key, <>f__AnonymousType.Values[0].Field, <>f__AnonymousType.Values[0].Value);
						bool flag7 = !operateResult2.IsSuccess;
						if (flag7)
						{
							return operateResult2;
						}
					}
					else
					{
						OperateResult operateResult3 = redis.WriteHashKey(<>f__AnonymousType.Key, Enumerable.ToArray<string>(Enumerable.Select<PropertyInfoHashKeyName, string>(<>f__AnonymousType.Values, (PropertyInfoHashKeyName m) => m.Field)), Enumerable.ToArray<string>(Enumerable.Select<PropertyInfoHashKeyName, string>(<>f__AnonymousType.Values, (PropertyInfoHashKeyName m) => m.Value)));
						bool flag8 = !operateResult3.IsSuccess;
						if (flag8)
						{
							return operateResult3;
						}
					}
				}
			}
			return OperateResult.CreateSuccessResult();
		}

		/// <summary>
		/// 从设备里读取支持Hsl特性的数据内容，
		/// 该特性为<see cref="T:HslCommunication.Reflection.HslRedisKeyAttribute" />，<see cref="T:HslCommunication.Reflection.HslRedisListItemAttribute" />，
		/// <see cref="T:HslCommunication.Reflection.HslRedisListAttribute" />，<see cref="T:HslCommunication.Reflection.HslRedisHashFieldAttribute" />
		/// 详细参考代码示例的操作说明。
		/// </summary>
		/// <typeparam name="T">自定义的数据类型对象</typeparam>
		/// <param name="redis">Redis的数据对象</param>
		/// <returns>包含是否成功的结果对象</returns>
		// Token: 0x060017DF RID: 6111 RVA: 0x0007ADC4 File Offset: 0x00078FC4
		[DebuggerStepThrough]
		public static Task<OperateResult<T>> ReadAsync<T>(RedisClient redis) where T : class, new()
		{
			HslReflectionHelper.<ReadAsync>d__9<T> <ReadAsync>d__ = new HslReflectionHelper.<ReadAsync>d__9<T>();
			<ReadAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<T>>.Create();
			<ReadAsync>d__.redis = redis;
			<ReadAsync>d__.<>1__state = -1;
			<ReadAsync>d__.<>t__builder.Start<HslReflectionHelper.<ReadAsync>d__9<T>>(ref <ReadAsync>d__);
			return <ReadAsync>d__.<>t__builder.Task;
		}

		/// <summary>
		/// 从设备里写入支持Hsl特性的数据内容，
		/// 该特性为<see cref="T:HslCommunication.Reflection.HslRedisKeyAttribute" /> ，<see cref="T:HslCommunication.Reflection.HslRedisHashFieldAttribute" />
		/// 需要注意的是写入并不支持<see cref="T:HslCommunication.Reflection.HslRedisListAttribute" />，<see cref="T:HslCommunication.Reflection.HslRedisListItemAttribute" />特性，详细参考代码示例的操作说明。
		/// </summary>
		/// <typeparam name="T">自定义的数据类型对象</typeparam>
		/// <param name="data">等待写入的数据参数</param>
		/// <param name="redis">Redis的数据对象</param>
		/// <returns>包含是否成功的结果对象</returns>
		// Token: 0x060017E0 RID: 6112 RVA: 0x0007AE08 File Offset: 0x00079008
		[DebuggerStepThrough]
		public static Task<OperateResult> WriteAsync<T>(T data, RedisClient redis) where T : class, new()
		{
			HslReflectionHelper.<WriteAsync>d__10<T> <WriteAsync>d__ = new HslReflectionHelper.<WriteAsync>d__10<T>();
			<WriteAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<WriteAsync>d__.data = data;
			<WriteAsync>d__.redis = redis;
			<WriteAsync>d__.<>1__state = -1;
			<WriteAsync>d__.<>t__builder.Start<HslReflectionHelper.<WriteAsync>d__10<T>>(ref <WriteAsync>d__);
			return <WriteAsync>d__.<>t__builder.Task;
		}

		/// <summary>
		/// 从Json数据里解析出真实的数据信息，根据方法参数列表的类型进行反解析，然后返回实际的数据数组<br />
		/// Analyze the real data information from the Json data, perform de-analysis according to the type of the method parameter list, 
		/// and then return the actual data array
		/// </summary>
		/// <param name="parameters">提供的参数列表信息</param>
		/// <param name="json">参数变量信息</param>
		/// <returns>已经填好的实际数据的参数数组对象</returns>
		// Token: 0x060017E1 RID: 6113 RVA: 0x0007AE54 File Offset: 0x00079054
		public static object[] GetParametersFromJson(ParameterInfo[] parameters, string json)
		{
			JObject jobject = string.IsNullOrEmpty(json) ? new JObject() : JObject.Parse(json);
			object[] array = new object[parameters.Length];
			for (int i = 0; i < parameters.Length; i++)
			{
				bool flag = parameters[i].ParameterType == typeof(byte);
				if (flag)
				{
					array[i] = jobject.Value<byte>(parameters[i].Name);
				}
				else
				{
					bool flag2 = parameters[i].ParameterType == typeof(short);
					if (flag2)
					{
						array[i] = jobject.Value<short>(parameters[i].Name);
					}
					else
					{
						bool flag3 = parameters[i].ParameterType == typeof(ushort);
						if (flag3)
						{
							array[i] = jobject.Value<ushort>(parameters[i].Name);
						}
						else
						{
							bool flag4 = parameters[i].ParameterType == typeof(int);
							if (flag4)
							{
								array[i] = jobject.Value<int>(parameters[i].Name);
							}
							else
							{
								bool flag5 = parameters[i].ParameterType == typeof(uint);
								if (flag5)
								{
									array[i] = jobject.Value<uint>(parameters[i].Name);
								}
								else
								{
									bool flag6 = parameters[i].ParameterType == typeof(long);
									if (flag6)
									{
										array[i] = jobject.Value<long>(parameters[i].Name);
									}
									else
									{
										bool flag7 = parameters[i].ParameterType == typeof(ulong);
										if (flag7)
										{
											array[i] = jobject.Value<ulong>(parameters[i].Name);
										}
										else
										{
											bool flag8 = parameters[i].ParameterType == typeof(double);
											if (flag8)
											{
												array[i] = jobject.Value<double>(parameters[i].Name);
											}
											else
											{
												bool flag9 = parameters[i].ParameterType == typeof(float);
												if (flag9)
												{
													array[i] = jobject.Value<float>(parameters[i].Name);
												}
												else
												{
													bool flag10 = parameters[i].ParameterType == typeof(bool);
													if (flag10)
													{
														array[i] = jobject.Value<bool>(parameters[i].Name);
													}
													else
													{
														bool flag11 = parameters[i].ParameterType == typeof(string);
														if (flag11)
														{
															array[i] = jobject.Value<string>(parameters[i].Name);
														}
														else
														{
															bool flag12 = parameters[i].ParameterType == typeof(DateTime);
															if (flag12)
															{
																array[i] = jobject.Value<DateTime>(parameters[i].Name);
															}
															else
															{
																bool flag13 = parameters[i].ParameterType == typeof(byte[]);
																if (flag13)
																{
																	array[i] = jobject.Value<string>(parameters[i].Name).ToHexBytes();
																}
																else
																{
																	bool flag14 = parameters[i].ParameterType == typeof(short[]);
																	if (flag14)
																	{
																		array[i] = Enumerable.ToArray<short>(Enumerable.Select<JToken, short>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<short>(m)));
																	}
																	else
																	{
																		bool flag15 = parameters[i].ParameterType == typeof(ushort[]);
																		if (flag15)
																		{
																			array[i] = Enumerable.ToArray<ushort>(Enumerable.Select<JToken, ushort>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<ushort>(m)));
																		}
																		else
																		{
																			bool flag16 = parameters[i].ParameterType == typeof(int[]);
																			if (flag16)
																			{
																				array[i] = Enumerable.ToArray<int>(Enumerable.Select<JToken, int>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<int>(m)));
																			}
																			else
																			{
																				bool flag17 = parameters[i].ParameterType == typeof(uint[]);
																				if (flag17)
																				{
																					array[i] = Enumerable.ToArray<uint>(Enumerable.Select<JToken, uint>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<uint>(m)));
																				}
																				else
																				{
																					bool flag18 = parameters[i].ParameterType == typeof(long[]);
																					if (flag18)
																					{
																						array[i] = Enumerable.ToArray<long>(Enumerable.Select<JToken, long>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<long>(m)));
																					}
																					else
																					{
																						bool flag19 = parameters[i].ParameterType == typeof(ulong[]);
																						if (flag19)
																						{
																							array[i] = Enumerable.ToArray<ulong>(Enumerable.Select<JToken, ulong>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<ulong>(m)));
																						}
																						else
																						{
																							bool flag20 = parameters[i].ParameterType == typeof(float[]);
																							if (flag20)
																							{
																								array[i] = Enumerable.ToArray<float>(Enumerable.Select<JToken, float>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<float>(m)));
																							}
																							else
																							{
																								bool flag21 = parameters[i].ParameterType == typeof(double[]);
																								if (flag21)
																								{
																									array[i] = Enumerable.ToArray<double>(Enumerable.Select<JToken, double>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<double>(m)));
																								}
																								else
																								{
																									bool flag22 = parameters[i].ParameterType == typeof(bool[]);
																									if (flag22)
																									{
																										array[i] = Enumerable.ToArray<bool>(Enumerable.Select<JToken, bool>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<bool>(m)));
																									}
																									else
																									{
																										bool flag23 = parameters[i].ParameterType == typeof(string[]);
																										if (flag23)
																										{
																											array[i] = Enumerable.ToArray<string>(Enumerable.Select<JToken, string>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<string>(m)));
																										}
																										else
																										{
																											bool flag24 = parameters[i].ParameterType == typeof(DateTime[]);
																											if (flag24)
																											{
																												array[i] = Enumerable.ToArray<DateTime>(Enumerable.Select<JToken, DateTime>(Enumerable.ToArray<JToken>(jobject[parameters[i].Name]), (JToken m) => Extensions.Value<DateTime>(m)));
																											}
																											else
																											{
																												array[i] = jobject[parameters[i].Name].ToObject(parameters[i].ParameterType);
																											}
																										}
																									}
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			return array;
		}

		/// <summary>
		/// 从url数据里解析出真实的数据信息，根据方法参数列表的类型进行反解析，然后返回实际的数据数组<br />
		/// Analyze the real data information from the url data, perform de-analysis according to the type of the method parameter list, 
		/// and then return the actual data array
		/// </summary>
		/// <param name="parameters">提供的参数列表信息</param>
		/// <param name="url">参数变量信息</param>
		/// <returns>已经填好的实际数据的参数数组对象</returns>
		// Token: 0x060017E2 RID: 6114 RVA: 0x0007B5B8 File Offset: 0x000797B8
		public static object[] GetParametersFromUrl(ParameterInfo[] parameters, string url)
		{
			bool flag = url.IndexOf('?') > 0;
			if (flag)
			{
				url = url.Substring(url.IndexOf('?') + 1);
			}
			string[] array = url.Split(new char[]
			{
				'&'
			}, StringSplitOptions.RemoveEmptyEntries);
			Dictionary<string, string> dictionary = new Dictionary<string, string>(array.Length);
			for (int i = 0; i < array.Length; i++)
			{
				bool flag2 = !string.IsNullOrEmpty(array[i]);
				if (flag2)
				{
					bool flag3 = array[i].IndexOf('=') > 0;
					if (flag3)
					{
						dictionary.Add(array[i].Substring(0, array[i].IndexOf('=')).Trim(new char[]
						{
							' '
						}), array[i].Substring(array[i].IndexOf('=') + 1));
					}
				}
			}
			object[] array2 = new object[parameters.Length];
			for (int j = 0; j < parameters.Length; j++)
			{
				bool flag4 = parameters[j].ParameterType == typeof(byte);
				if (flag4)
				{
					array2[j] = byte.Parse(dictionary[parameters[j].Name]);
				}
				else
				{
					bool flag5 = parameters[j].ParameterType == typeof(short);
					if (flag5)
					{
						array2[j] = short.Parse(dictionary[parameters[j].Name]);
					}
					else
					{
						bool flag6 = parameters[j].ParameterType == typeof(ushort);
						if (flag6)
						{
							array2[j] = ushort.Parse(dictionary[parameters[j].Name]);
						}
						else
						{
							bool flag7 = parameters[j].ParameterType == typeof(int);
							if (flag7)
							{
								array2[j] = int.Parse(dictionary[parameters[j].Name]);
							}
							else
							{
								bool flag8 = parameters[j].ParameterType == typeof(uint);
								if (flag8)
								{
									array2[j] = uint.Parse(dictionary[parameters[j].Name]);
								}
								else
								{
									bool flag9 = parameters[j].ParameterType == typeof(long);
									if (flag9)
									{
										array2[j] = long.Parse(dictionary[parameters[j].Name]);
									}
									else
									{
										bool flag10 = parameters[j].ParameterType == typeof(ulong);
										if (flag10)
										{
											array2[j] = ulong.Parse(dictionary[parameters[j].Name]);
										}
										else
										{
											bool flag11 = parameters[j].ParameterType == typeof(double);
											if (flag11)
											{
												array2[j] = double.Parse(dictionary[parameters[j].Name]);
											}
											else
											{
												bool flag12 = parameters[j].ParameterType == typeof(float);
												if (flag12)
												{
													array2[j] = float.Parse(dictionary[parameters[j].Name]);
												}
												else
												{
													bool flag13 = parameters[j].ParameterType == typeof(bool);
													if (flag13)
													{
														array2[j] = bool.Parse(dictionary[parameters[j].Name]);
													}
													else
													{
														bool flag14 = parameters[j].ParameterType == typeof(string);
														if (flag14)
														{
															array2[j] = dictionary[parameters[j].Name];
														}
														else
														{
															bool flag15 = parameters[j].ParameterType == typeof(DateTime);
															if (flag15)
															{
																array2[j] = DateTime.Parse(dictionary[parameters[j].Name]);
															}
															else
															{
																bool flag16 = parameters[j].ParameterType == typeof(byte[]);
																if (flag16)
																{
																	array2[j] = dictionary[parameters[j].Name].ToHexBytes();
																}
																else
																{
																	bool flag17 = parameters[j].ParameterType == typeof(short[]);
																	if (flag17)
																	{
																		array2[j] = dictionary[parameters[j].Name].ToStringArray<short>();
																	}
																	else
																	{
																		bool flag18 = parameters[j].ParameterType == typeof(ushort[]);
																		if (flag18)
																		{
																			array2[j] = dictionary[parameters[j].Name].ToStringArray<ushort>();
																		}
																		else
																		{
																			bool flag19 = parameters[j].ParameterType == typeof(int[]);
																			if (flag19)
																			{
																				array2[j] = dictionary[parameters[j].Name].ToStringArray<int>();
																			}
																			else
																			{
																				bool flag20 = parameters[j].ParameterType == typeof(uint[]);
																				if (flag20)
																				{
																					array2[j] = dictionary[parameters[j].Name].ToStringArray<uint>();
																				}
																				else
																				{
																					bool flag21 = parameters[j].ParameterType == typeof(long[]);
																					if (flag21)
																					{
																						array2[j] = dictionary[parameters[j].Name].ToStringArray<long>();
																					}
																					else
																					{
																						bool flag22 = parameters[j].ParameterType == typeof(ulong[]);
																						if (flag22)
																						{
																							array2[j] = dictionary[parameters[j].Name].ToStringArray<ulong>();
																						}
																						else
																						{
																							bool flag23 = parameters[j].ParameterType == typeof(float[]);
																							if (flag23)
																							{
																								array2[j] = dictionary[parameters[j].Name].ToStringArray<float>();
																							}
																							else
																							{
																								bool flag24 = parameters[j].ParameterType == typeof(double[]);
																								if (flag24)
																								{
																									array2[j] = dictionary[parameters[j].Name].ToStringArray<double>();
																								}
																								else
																								{
																									bool flag25 = parameters[j].ParameterType == typeof(bool[]);
																									if (flag25)
																									{
																										array2[j] = dictionary[parameters[j].Name].ToStringArray<bool>();
																									}
																									else
																									{
																										bool flag26 = parameters[j].ParameterType == typeof(string[]);
																										if (flag26)
																										{
																											array2[j] = dictionary[parameters[j].Name].ToStringArray<string>();
																										}
																										else
																										{
																											bool flag27 = parameters[j].ParameterType == typeof(DateTime[]);
																											if (flag27)
																											{
																												array2[j] = dictionary[parameters[j].Name].ToStringArray<DateTime>();
																											}
																											else
																											{
																												array2[j] = JToken.Parse(dictionary[parameters[j].Name]).ToObject(parameters[j].ParameterType);
																											}
																										}
																									}
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			return array2;
		}

		/// <summary>
		/// 从方法的参数列表里，提取出实际的示例参数信息，返回一个json对象，注意：该数据是示例的数据，具体参数的限制参照服务器返回的数据声明。<br />
		/// From the parameter list of the method, extract the actual example parameter information, and return a json object. Note: The data is the example data, 
		/// and the specific parameter restrictions refer to the data declaration returned by the server.
		/// </summary>
		/// <param name="method">当前需要解析的方法名称</param>
		/// <returns>当前的参数对象信息</returns>
		// Token: 0x060017E3 RID: 6115 RVA: 0x0007BC98 File Offset: 0x00079E98
		public static JObject GetParametersFromJson(MethodInfo method)
		{
			ParameterInfo[] parameters = method.GetParameters();
			JObject jobject = new JObject();
			for (int i = 0; i < parameters.Length; i++)
			{
				bool flag = parameters[i].ParameterType == typeof(byte);
				if (flag)
				{
					jobject.Add(parameters[i].Name, new JValue((long)((ulong)(parameters[i].HasDefaultValue ? ((byte)parameters[i].DefaultValue) : 0))));
				}
				else
				{
					bool flag2 = parameters[i].ParameterType == typeof(short);
					if (flag2)
					{
						jobject.Add(parameters[i].Name, new JValue((long)(parameters[i].HasDefaultValue ? ((short)parameters[i].DefaultValue) : 0)));
					}
					else
					{
						bool flag3 = parameters[i].ParameterType == typeof(ushort);
						if (flag3)
						{
							jobject.Add(parameters[i].Name, new JValue((long)((ulong)(parameters[i].HasDefaultValue ? ((ushort)parameters[i].DefaultValue) : 0))));
						}
						else
						{
							bool flag4 = parameters[i].ParameterType == typeof(int);
							if (flag4)
							{
								jobject.Add(parameters[i].Name, new JValue((long)(parameters[i].HasDefaultValue ? ((int)parameters[i].DefaultValue) : 0)));
							}
							else
							{
								bool flag5 = parameters[i].ParameterType == typeof(uint);
								if (flag5)
								{
									jobject.Add(parameters[i].Name, new JValue((long)((ulong)(parameters[i].HasDefaultValue ? ((uint)parameters[i].DefaultValue) : 0U))));
								}
								else
								{
									bool flag6 = parameters[i].ParameterType == typeof(long);
									if (flag6)
									{
										jobject.Add(parameters[i].Name, new JValue(parameters[i].HasDefaultValue ? ((long)parameters[i].DefaultValue) : 0L));
									}
									else
									{
										bool flag7 = parameters[i].ParameterType == typeof(ulong);
										if (flag7)
										{
											jobject.Add(parameters[i].Name, new JValue(parameters[i].HasDefaultValue ? ((ulong)parameters[i].DefaultValue) : 0UL));
										}
										else
										{
											bool flag8 = parameters[i].ParameterType == typeof(double);
											if (flag8)
											{
												jobject.Add(parameters[i].Name, new JValue(parameters[i].HasDefaultValue ? ((double)parameters[i].DefaultValue) : 0.0));
											}
											else
											{
												bool flag9 = parameters[i].ParameterType == typeof(float);
												if (flag9)
												{
													jobject.Add(parameters[i].Name, new JValue(parameters[i].HasDefaultValue ? ((float)parameters[i].DefaultValue) : 0f));
												}
												else
												{
													bool flag10 = parameters[i].ParameterType == typeof(bool);
													if (flag10)
													{
														jobject.Add(parameters[i].Name, new JValue(parameters[i].HasDefaultValue && (bool)parameters[i].DefaultValue));
													}
													else
													{
														bool flag11 = parameters[i].ParameterType == typeof(string);
														if (flag11)
														{
															jobject.Add(parameters[i].Name, new JValue(parameters[i].HasDefaultValue ? ((string)parameters[i].DefaultValue) : ""));
														}
														else
														{
															bool flag12 = parameters[i].ParameterType == typeof(DateTime);
															if (flag12)
															{
																jobject.Add(parameters[i].Name, new JValue(parameters[i].HasDefaultValue ? ((DateTime)parameters[i].DefaultValue).ToString("yyyy-MM-dd HH:mm:ss") : DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")));
															}
															else
															{
																bool flag13 = parameters[i].ParameterType == typeof(byte[]);
																if (flag13)
																{
																	jobject.Add(parameters[i].Name, new JValue(parameters[i].HasDefaultValue ? ((byte[])parameters[i].DefaultValue).ToHexString() : "00 1A 2B 3C 4D"));
																}
																else
																{
																	bool flag14 = parameters[i].ParameterType == typeof(short[]);
																	if (flag14)
																	{
																		JObject jobject2 = jobject;
																		string name = parameters[i].Name;
																		short[] array;
																		if (!parameters[i].HasDefaultValue)
																		{
																			RuntimeHelpers.InitializeArray(array = new short[3], fieldof(<PrivateImplementationDetails>.047DBF5366372631BA7E3E02520E651446B899C96C4B64663BAC378A298A7BF7).FieldHandle);
																		}
																		else
																		{
																			array = (short[])parameters[i].DefaultValue;
																		}
																		jobject2.Add(name, new JArray(array));
																	}
																	else
																	{
																		bool flag15 = parameters[i].ParameterType == typeof(ushort[]);
																		if (flag15)
																		{
																			JObject jobject3 = jobject;
																			string name2 = parameters[i].Name;
																			ushort[] array2;
																			if (!parameters[i].HasDefaultValue)
																			{
																				RuntimeHelpers.InitializeArray(array2 = new ushort[3], fieldof(<PrivateImplementationDetails>.047DBF5366372631BA7E3E02520E651446B899C96C4B64663BAC378A298A7BF7).FieldHandle);
																			}
																			else
																			{
																				array2 = (ushort[])parameters[i].DefaultValue;
																			}
																			jobject3.Add(name2, new JArray(array2));
																		}
																		else
																		{
																			bool flag16 = parameters[i].ParameterType == typeof(int[]);
																			if (flag16)
																			{
																				JObject jobject4 = jobject;
																				string name3 = parameters[i].Name;
																				int[] array3;
																				if (!parameters[i].HasDefaultValue)
																				{
																					RuntimeHelpers.InitializeArray(array3 = new int[3], fieldof(<PrivateImplementationDetails>.4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D).FieldHandle);
																				}
																				else
																				{
																					array3 = (int[])parameters[i].DefaultValue;
																				}
																				jobject4.Add(name3, new JArray(array3));
																			}
																			else
																			{
																				bool flag17 = parameters[i].ParameterType == typeof(uint[]);
																				if (flag17)
																				{
																					JObject jobject5 = jobject;
																					string name4 = parameters[i].Name;
																					uint[] array4;
																					if (!parameters[i].HasDefaultValue)
																					{
																						RuntimeHelpers.InitializeArray(array4 = new uint[3], fieldof(<PrivateImplementationDetails>.4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D).FieldHandle);
																					}
																					else
																					{
																						array4 = (uint[])parameters[i].DefaultValue;
																					}
																					jobject5.Add(name4, new JArray(array4));
																				}
																				else
																				{
																					bool flag18 = parameters[i].ParameterType == typeof(long[]);
																					if (flag18)
																					{
																						JObject jobject6 = jobject;
																						string name5 = parameters[i].Name;
																						long[] array5;
																						if (!parameters[i].HasDefaultValue)
																						{
																							RuntimeHelpers.InitializeArray(array5 = new long[3], fieldof(<PrivateImplementationDetails>.E2E2033AE7E19D680599D4EB0A1359A2B48EC5BAAC75066C317FBF85159C54EF).FieldHandle);
																						}
																						else
																						{
																							array5 = (long[])parameters[i].DefaultValue;
																						}
																						jobject6.Add(name5, new JArray(array5));
																					}
																					else
																					{
																						bool flag19 = parameters[i].ParameterType == typeof(ulong[]);
																						if (flag19)
																						{
																							JObject jobject7 = jobject;
																							string name6 = parameters[i].Name;
																							ulong[] array6;
																							if (!parameters[i].HasDefaultValue)
																							{
																								RuntimeHelpers.InitializeArray(array6 = new ulong[3], fieldof(<PrivateImplementationDetails>.E2E2033AE7E19D680599D4EB0A1359A2B48EC5BAAC75066C317FBF85159C54EF).FieldHandle);
																							}
																							else
																							{
																								array6 = (ulong[])parameters[i].DefaultValue;
																							}
																							jobject7.Add(name6, new JArray(array6));
																						}
																						else
																						{
																							bool flag20 = parameters[i].ParameterType == typeof(float[]);
																							if (flag20)
																							{
																								JObject jobject8 = jobject;
																								string name7 = parameters[i].Name;
																								float[] array7;
																								if (!parameters[i].HasDefaultValue)
																								{
																									RuntimeHelpers.InitializeArray(array7 = new float[3], fieldof(<PrivateImplementationDetails>.8E628779E6A74EE0B36991C10158F63CAFEC7D340AD4E075592502C8708524DD).FieldHandle);
																								}
																								else
																								{
																									array7 = (float[])parameters[i].DefaultValue;
																								}
																								jobject8.Add(name7, new JArray(array7));
																							}
																							else
																							{
																								bool flag21 = parameters[i].ParameterType == typeof(double[]);
																								if (flag21)
																								{
																									JObject jobject9 = jobject;
																									string name8 = parameters[i].Name;
																									double[] array8;
																									if (!parameters[i].HasDefaultValue)
																									{
																										RuntimeHelpers.InitializeArray(array8 = new double[3], fieldof(<PrivateImplementationDetails>.A68DE4B5E96A60C8CEB3C7B7EF93461725BDBBFF3516B136585A743B5C0EC664).FieldHandle);
																									}
																									else
																									{
																										array8 = (double[])parameters[i].DefaultValue;
																									}
																									jobject9.Add(name8, new JArray(array8));
																								}
																								else
																								{
																									bool flag22 = parameters[i].ParameterType == typeof(bool[]);
																									if (flag22)
																									{
																										JObject jobject10 = jobject;
																										string name9 = parameters[i].Name;
																										bool[] array9;
																										if (!parameters[i].HasDefaultValue)
																										{
																											(array9 = new bool[3])[0] = true;
																										}
																										else
																										{
																											array9 = (bool[])parameters[i].DefaultValue;
																										}
																										jobject10.Add(name9, new JArray(array9));
																									}
																									else
																									{
																										bool flag23 = parameters[i].ParameterType == typeof(string[]);
																										if (flag23)
																										{
																											JObject jobject11 = jobject;
																											string name10 = parameters[i].Name;
																											object[] array11;
																											if (!parameters[i].HasDefaultValue)
																											{
																												string[] array10 = new string[3];
																												array10[0] = "1";
																												array10[1] = "2";
																												array11 = array10;
																												array10[2] = "3";
																											}
																											else
																											{
																												array11 = (string[])parameters[i].DefaultValue;
																											}
																											object[] array12 = array11;
																											jobject11.Add(name10, new JArray(array12));
																										}
																										else
																										{
																											bool flag24 = parameters[i].ParameterType == typeof(DateTime[]);
																											if (flag24)
																											{
																												JObject jobject12 = jobject;
																												string name11 = parameters[i].Name;
																												string[] array13;
																												if (!parameters[i].HasDefaultValue)
																												{
																													(array13 = new string[1])[0] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
																												}
																												else
																												{
																													array13 = Enumerable.ToArray<string>(Enumerable.Select<DateTime, string>((DateTime[])parameters[i].DefaultValue, (DateTime m) => m.ToString("yyyy-MM-dd HH:mm:ss")));
																												}
																												object[] array12 = array13;
																												jobject12.Add(name11, new JArray(array12));
																											}
																											else
																											{
																												jobject.Add(parameters[i].Name, JToken.FromObject(parameters[i].HasDefaultValue ? parameters[i].DefaultValue : Activator.CreateInstance(parameters[i].ParameterType)));
																											}
																										}
																									}
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			return jobject;
		}

		/// <summary>
		/// 将一个对象转换成 <see cref="T:HslCommunication.OperateResult`1" /> 的string 类型的对象，用于远程RPC的数据交互 
		/// </summary>
		/// <param name="obj">自定义的对象</param>
		/// <returns>转换之后的结果对象</returns>
		// Token: 0x060017E4 RID: 6116 RVA: 0x0007C5B8 File Offset: 0x0007A7B8
		public static OperateResult<string> GetOperateResultJsonFromObj(object obj)
		{
			OperateResult operateResult = obj as OperateResult;
			bool flag = operateResult != null;
			OperateResult<string> result;
			if (flag)
			{
				OperateResult<string> operateResult2 = new OperateResult<string>();
				operateResult2.IsSuccess = operateResult.IsSuccess;
				operateResult2.ErrorCode = operateResult.ErrorCode;
				operateResult2.Message = operateResult.Message;
				bool isSuccess = operateResult.IsSuccess;
				if (isSuccess)
				{
					PropertyInfo property = obj.GetType().GetProperty("Content");
					bool flag2 = property != null;
					if (flag2)
					{
						object value = property.GetValue(obj, null);
						bool flag3 = value != null;
						if (flag3)
						{
							operateResult2.Content = value.ToJsonString(1);
						}
						result = operateResult2;
					}
					else
					{
						PropertyInfo property2 = obj.GetType().GetProperty("Content1");
						bool flag4 = property2 == null;
						if (flag4)
						{
							result = operateResult2;
						}
						else
						{
							PropertyInfo property3 = obj.GetType().GetProperty("Content2");
							bool flag5 = property3 == null;
							if (flag5)
							{
								operateResult2.Content = new
								{
									Content1 = property2.GetValue(obj, null)
								}.ToJsonString(1);
								result = operateResult2;
							}
							else
							{
								PropertyInfo property4 = obj.GetType().GetProperty("Content3");
								bool flag6 = property4 == null;
								if (flag6)
								{
									operateResult2.Content = new
									{
										Content1 = property2.GetValue(obj, null),
										Content2 = property3.GetValue(obj, null)
									}.ToJsonString(1);
									result = operateResult2;
								}
								else
								{
									PropertyInfo property5 = obj.GetType().GetProperty("Content4");
									bool flag7 = property5 == null;
									if (flag7)
									{
										operateResult2.Content = new
										{
											Content1 = property2.GetValue(obj, null),
											Content2 = property3.GetValue(obj, null),
											Content3 = property4.GetValue(obj, null)
										}.ToJsonString(1);
										result = operateResult2;
									}
									else
									{
										PropertyInfo property6 = obj.GetType().GetProperty("Content5");
										bool flag8 = property6 == null;
										if (flag8)
										{
											operateResult2.Content = new
											{
												Content1 = property2.GetValue(obj, null),
												Content2 = property3.GetValue(obj, null),
												Content3 = property4.GetValue(obj, null),
												Content4 = property5.GetValue(obj, null)
											}.ToJsonString(1);
											result = operateResult2;
										}
										else
										{
											PropertyInfo property7 = obj.GetType().GetProperty("Content6");
											bool flag9 = property7 == null;
											if (flag9)
											{
												operateResult2.Content = new
												{
													Content1 = property2.GetValue(obj, null),
													Content2 = property3.GetValue(obj, null),
													Content3 = property4.GetValue(obj, null),
													Content4 = property5.GetValue(obj, null),
													Content5 = property6.GetValue(obj, null)
												}.ToJsonString(1);
												result = operateResult2;
											}
											else
											{
												PropertyInfo property8 = obj.GetType().GetProperty("Content7");
												bool flag10 = property8 == null;
												if (flag10)
												{
													operateResult2.Content = new
													{
														Content1 = property2.GetValue(obj, null),
														Content2 = property3.GetValue(obj, null),
														Content3 = property4.GetValue(obj, null),
														Content4 = property5.GetValue(obj, null),
														Content5 = property6.GetValue(obj, null),
														Content6 = property7.GetValue(obj, null)
													}.ToJsonString(1);
													result = operateResult2;
												}
												else
												{
													PropertyInfo property9 = obj.GetType().GetProperty("Content8");
													bool flag11 = property9 == null;
													if (flag11)
													{
														operateResult2.Content = new
														{
															Content1 = property2.GetValue(obj, null),
															Content2 = property3.GetValue(obj, null),
															Content3 = property4.GetValue(obj, null),
															Content4 = property5.GetValue(obj, null),
															Content5 = property6.GetValue(obj, null),
															Content6 = property7.GetValue(obj, null),
															Content7 = property8.GetValue(obj, null)
														}.ToJsonString(1);
														result = operateResult2;
													}
													else
													{
														PropertyInfo property10 = obj.GetType().GetProperty("Content9");
														bool flag12 = property10 == null;
														if (flag12)
														{
															operateResult2.Content = new
															{
																Content1 = property2.GetValue(obj, null),
																Content2 = property3.GetValue(obj, null),
																Content3 = property4.GetValue(obj, null),
																Content4 = property5.GetValue(obj, null),
																Content5 = property6.GetValue(obj, null),
																Content6 = property7.GetValue(obj, null),
																Content7 = property8.GetValue(obj, null),
																Content8 = property9.GetValue(obj, null)
															}.ToJsonString(1);
															result = operateResult2;
														}
														else
														{
															PropertyInfo property11 = obj.GetType().GetProperty("Content10");
															bool flag13 = property11 == null;
															if (flag13)
															{
																operateResult2.Content = new
																{
																	Content1 = property2.GetValue(obj, null),
																	Content2 = property3.GetValue(obj, null),
																	Content3 = property4.GetValue(obj, null),
																	Content4 = property5.GetValue(obj, null),
																	Content5 = property6.GetValue(obj, null),
																	Content6 = property7.GetValue(obj, null),
																	Content7 = property8.GetValue(obj, null),
																	Content8 = property9.GetValue(obj, null),
																	Content9 = property10.GetValue(obj, null)
																}.ToJsonString(1);
																result = operateResult2;
															}
															else
															{
																operateResult2.Content = new
																{
																	Content1 = property2.GetValue(obj, null),
																	Content2 = property3.GetValue(obj, null),
																	Content3 = property4.GetValue(obj, null),
																	Content4 = property5.GetValue(obj, null),
																	Content5 = property6.GetValue(obj, null),
																	Content6 = property7.GetValue(obj, null),
																	Content7 = property8.GetValue(obj, null),
																	Content8 = property9.GetValue(obj, null),
																	Content9 = property10.GetValue(obj, null),
																	Content10 = property11.GetValue(obj, null)
																}.ToJsonString(1);
																result = operateResult2;
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
				else
				{
					result = operateResult2;
				}
			}
			else
			{
				result = OperateResult.CreateSuccessResult<string>((obj == null) ? string.Empty : obj.ToJsonString(1));
			}
			return result;
		}
	}
}
